package com.lokyiu.mybible.domain;

import java.util.List;

public class Chapter {
	private List<Verse> verses;
	private String bibleBook;
	private String url;
	private int chapterNumber;
		
	public String getUrl() {
		return url;
	}


	public String getBibleBook() {
		return bibleBook;
	}
	
	public int getChapterNumber() {
		return chapterNumber;
	}
	
	public Chapter(String bibleBook){
		this.bibleBook=bibleBook;
	}
	
	public Chapter(String bibleBook,int chapterNumber,String url){
		this.chapterNumber=chapterNumber;
		this.url=url;
		this.bibleBook=bibleBook;
	}

	public List<Verse> getVerses() {
		//TODO
		//return null;
		return this.verses;
	}
	
	public String toString() {
		return "Book:" + bibleBook + " Chapter:" + chapterNumber + " url:" + url;
	}

	@Override
	public boolean equals(Object obj) {
		Chapter objToCompare = (Chapter)obj;
		boolean urlCompare = this.url == null || objToCompare.getUrl() == null ? true
				: this.url.equals(objToCompare.getUrl());
		return this.getBibleBook().equals(objToCompare.getBibleBook()) && urlCompare && (this.getChapterNumber() == objToCompare.getChapterNumber());
	}
}
